package demo2;

import java.util.Arrays;

public class Test {

    public static void main(String[] args) {
        Cat cat = new Cat("嘉嘉", 2);
        // cat.show();
        System.out.println(cat);

        String[] array = new String[3];
        System.out.println(Arrays.toString(array));
    }

    public static void main3(String[] args) {
        Cat cat = new Cat("小咪", 2);
        cat.show();
    }

    public static void main2(String[] args) {
        Cat cat = new Cat();
        // cat.setName("咪咪", 5);
        cat.show();
    }

    public static void main1(String[] args) {
        Dog dog = new Dog();
        Dog dog1 = new Dog();
        // dog.show();
        // System.out.println(dog.flg);

        dog.name = "旺财";
        dog.age = 2;
        dog.bark();
        dog.eat();

        dog1.name = "哈士奇";
        dog1.age = 3;
        dog1.bark();
        dog1.eat();
    }

}
